
package net.swa.dewei.beans.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.GenericGenerator;

/**
 * 广告信息实体类
 * @author dawei
 *
 */
@Entity
@Table(name = "t_Advertisement")
public class Advertisement
{
    //PK
    private Long id;

    /**名称（暂未使用，待扩展）**/
    private String name;

    /**图片，可以为多幅图片，存数组逗号隔开，长度要设置很大2000**/
    private String imageUrl;

    /**详细说明**/
    private String detailInfo;

    /**创建时间**/
    private String crateDate;

    /**更新时间**/
    private String updateDate;

    /**排序**/
    private Integer sort;

    /**省（不做实体映射）**/
    private String province;

    /**市（不做实体映射）**/
    private String city;

    /**县（不做实体映射）**/
    private String town;

    /** 电池状态  控制车型是否默认手机端显示 **/
    private String state;

    @GenericGenerator(name = "generator", strategy = "native")
    @Id
    @GeneratedValue(generator = "generator")
    @Column(name = "id", unique = true, nullable = false)
    public Long getId()
    {
        return id;
    }

    public void setId(Long id)
    {
        this.id = id;
    }

    public String getName()
    {
        return name;
    }

    public void setName(String name)
    {
        this.name = name;
    }

    @Column(length=3000)
    public String getImageUrl()
    {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl)
    {
        this.imageUrl = imageUrl;
    }

    public String getDetailInfo()
    {
        return detailInfo;
    }

    public void setDetailInfo(String detailInfo)
    {
        this.detailInfo = detailInfo;
    }

    public String getCrateDate()
    {
        return crateDate;
    }

    public void setCrateDate(String crateDate)
    {
        this.crateDate = crateDate;
    }

    public String getUpdateDate()
    {
        return updateDate;
    }

    public void setUpdateDate(String updateDate)
    {
        this.updateDate = updateDate;
    }

    public Integer getSort()
    {
        return sort;
    }

    public void setSort(Integer sort)
    {
        this.sort = sort;
    }

    @Transient
    public String getProvince()
    {
        return province;
    }

    public void setProvince(String province)
    {
        this.province = province;
    }

    @Transient
    public String getCity()
    {
        return city;
    }

    public void setCity(String city)
    {
        this.city = city;
    }

    @Transient
    public String getTown()
    {
        return town;
    }

    public void setTown(String town)
    {
        this.town = town;
    }

    public String getState()
    {
        return state;
    }

    public void setState(String state)
    {
        this.state = state;
    }

}
